<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>学知鸟</title>
		<link rel="shortcut icon" href="../../share/img/logo.png">
		<link rel="stylesheet" href="../../share/css/main.css">
		<script src="../../share/js/jquery-1.11.3.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			function test01() {
				let input = {
					name: "Ray",
					age: 10
				};
				$.ajax({
					url: "Q101.html",
					method: "POST",
					contentType: "application/json",
					data: input,
					success: function(res) {

					}
				});
				// input = JSON.stringify(input);
				// $.post("Q101.html", input, function(res) {
				// 	console.log(res);
				// });
			}

			function test02() {
				console.log($("#p1").parent().attr("id"))
			}
		</script>
	</head>
	<body class="p-10">
		<h3>jQuery 入门</h3>
		<section>
			<button type="button" onclick="test01();">Post JSON</button>
		</section>
		<section>
			<div id="d1">
				<p id="p1">美丽花园</p>
			</div>
			<button onclick="test02()">parent()</button>
		</section>
	</body>
</html>
